// 塔罗牌数据 - 包含78张牌的名称、含义和解读
export const tarotCards = {
  // 大阿卡纳 (Major Arcana) - 22张
  majorArcana: [
    {
      id: 0,
      name: "愚者",
      nameEn: "The Fool",
      number: 0,
      element: "风",
      keywords: ["开始", "冒险", "纯真", "自由"],
      upright: {
        meaning: "新的开始，冒险精神，纯真无邪，自由自在",
        description: "代表人生旅程的开始，充满无限可能性和冒险精神。提醒我们保持开放的心态，勇敢面对未知。"
      },
      reversed: {
        meaning: "鲁莽，不负责任，过度冒险",
        description: "可能过于冲动，缺乏计划，需要更加谨慎和负责任。"
      }
    },
    {
      id: 1,
      name: "魔术师",
      nameEn: "The Magician",
      number: 1,
      element: "风",
      keywords: ["创造", "技能", "意志力", "专注"],
      upright: {
        meaning: "创造力，技能运用，意志力，专注力",
        description: "代表运用自己的技能和创造力来实现目标，提醒我们专注当下，发挥潜能。"
      },
      reversed: {
        meaning: "技能未发挥，缺乏专注，机会浪费",
        description: "可能没有充分利用自己的技能，或者缺乏专注力来达成目标。"
      }
    },
    {
      id: 2,
      name: "女祭司",
      nameEn: "The High Priestess",
      number: 2,
      element: "水",
      keywords: ["直觉", "神秘", "智慧", "内在知识"],
      upright: {
        meaning: "直觉智慧，神秘知识，内在指引，静默观察",
        description: "代表内在的智慧和直觉，提醒我们倾听内心的声音，相信自己的直觉判断。"
      },
      reversed: {
        meaning: "直觉被忽视，表面化，缺乏深度",
        description: "可能忽视了内在的智慧，过于依赖外在信息，需要回归内心。"
      }
    },
    {
      id: 3,
      name: "女皇",
      nameEn: "The Empress",
      number: 3,
      element: "土",
      keywords: ["丰盛", "母性", "创造力", "自然"],
      upright: {
        meaning: "丰盛富足，母性关怀，创造力，自然和谐",
        description: "代表丰盛和创造力，提醒我们享受生活的美好，发挥创造力，关爱他人。"
      },
      reversed: {
        meaning: "缺乏丰盛，创造力受阻，过度依赖",
        description: "可能感到缺乏，创造力受阻，或者过度依赖他人。"
      }
    },
    {
      id: 4,
      name: "皇帝",
      nameEn: "The Emperor",
      number: 4,
      element: "火",
      keywords: ["权威", "领导", "稳定", "控制"],
      upright: {
        meaning: "权威领导，稳定控制，建立秩序，承担责任",
        description: "代表权威和领导力，提醒我们承担责任，建立秩序，展现领导才能。"
      },
      reversed: {
        meaning: "专制独裁，缺乏灵活性，过度控制",
        description: "可能过于专制，缺乏灵活性，或者过度控制他人。"
      }
    },
    {
      id: 5,
      name: "教皇",
      nameEn: "The Hierophant",
      number: 5,
      element: "土",
      keywords: ["传统", "教育", "信仰", "规则"],
      upright: {
        meaning: "传统智慧，教育指导，信仰体系，遵循规则",
        description: "代表传统和教育的价值，提醒我们尊重传统，学习知识，遵循道德准则。"
      },
      reversed: {
        meaning: "教条主义，过度传统，缺乏创新",
        description: "可能过于教条，缺乏创新精神，或者盲目遵循传统。"
      }
    },
    {
      id: 6,
      name: "恋人",
      nameEn: "The Lovers",
      number: 6,
      element: "风",
      keywords: ["选择", "关系", "和谐", "价值观"],
      upright: {
        meaning: "重要选择，和谐关系，价值观统一，爱情",
        description: "代表重要的选择和关系，提醒我们做出正确的选择，建立和谐的关系。"
      },
      reversed: {
        meaning: "关系不和，价值观冲突，选择困难",
        description: "可能面临关系问题，价值观冲突，或者难以做出选择。"
      }
    },
    {
      id: 7,
      name: "战车",
      nameEn: "The Chariot",
      number: 7,
      element: "水",
      keywords: ["胜利", "意志力", "控制", "前进"],
      upright: {
        meaning: "胜利成功，意志力，自我控制，前进动力",
        description: "代表胜利和前进，提醒我们运用意志力，控制自己，朝着目标前进。"
      },
      reversed: {
        meaning: "缺乏方向，意志力薄弱，控制失败",
        description: "可能缺乏方向感，意志力薄弱，或者失去控制。"
      }
    },
    {
      id: 8,
      name: "力量",
      nameEn: "Strength",
      number: 8,
      element: "火",
      keywords: ["内在力量", "勇气", "耐心", "温和"],
      upright: {
        meaning: "内在力量，勇气耐心，温和控制，克服困难",
        description: "代表内在的力量和勇气，提醒我们运用温和的方式，耐心地克服困难。"
      },
      reversed: {
        meaning: "缺乏自信，力量误用，过度控制",
        description: "可能缺乏自信，误用自己的力量，或者过度控制他人。"
      }
    },
    {
      id: 9,
      name: "隐者",
      nameEn: "The Hermit",
      number: 9,
      element: "土",
      keywords: ["独处", "内省", "智慧", "指引"],
      upright: {
        meaning: "独处内省，智慧指引，寻找真理，内在探索",
        description: "代表独处和内省，提醒我们静下心来思考，寻找内在的真理和智慧。"
      },
      reversed: {
        meaning: "孤独感，缺乏指引，迷失方向",
        description: "可能感到孤独，缺乏指引，或者迷失了方向。"
      }
    },
    {
      id: 10,
      name: "命运之轮",
      nameEn: "Wheel of Fortune",
      number: 10,
      element: "火",
      keywords: ["变化", "命运", "机会", "转折"],
      upright: {
        meaning: "命运变化，机会转折，新的开始，适应变化",
        description: "代表命运的变化和转折，提醒我们抓住机会，适应变化，迎接新的开始。"
      },
      reversed: {
        meaning: "变化受阻，机会错过，命运转折",
        description: "可能变化受阻，错过了机会，或者面临命运的转折。"
      }
    },
    {
      id: 11,
      name: "正义",
      nameEn: "Justice",
      number: 11,
      element: "风",
      keywords: ["平衡", "公正", "真理", "因果"],
      upright: {
        meaning: "公正平衡，真理正义，因果报应，理性判断",
        description: "代表公正和平衡，提醒我们理性判断，追求真理，相信因果报应。"
      },
      reversed: {
        meaning: "不公正，缺乏平衡，偏见判断",
        description: "可能面临不公正，缺乏平衡，或者带有偏见地判断。"
      }
    },
    {
      id: 12,
      name: "倒吊人",
      nameEn: "The Hanged Man",
      number: 12,
      element: "水",
      keywords: ["牺牲", "新视角", "暂停", "启示"],
      upright: {
        meaning: "牺牲奉献，新视角，暂停思考，获得启示",
        description: "代表牺牲和新的视角，提醒我们暂停下来，换个角度思考，获得新的启示。"
      },
      reversed: {
        meaning: "无意义的牺牲，缺乏新视角，停滞不前",
        description: "可能做了无意义的牺牲，缺乏新的视角，或者停滞不前。"
      }
    },
    {
      id: 13,
      name: "死神",
      nameEn: "Death",
      number: 13,
      element: "水",
      keywords: ["结束", "转变", "新生", "释放"],
      upright: {
        meaning: "结束转变，新生开始，释放过去，重大改变",
        description: "代表结束和转变，提醒我们接受改变，释放过去，迎接新的开始。"
      },
      reversed: {
        meaning: "抗拒改变，无法释放，停滞不前",
        description: "可能抗拒改变，无法释放过去，或者停滞不前。"
      }
    },
    {
      id: 14,
      name: "节制",
      nameEn: "Temperance",
      number: 14,
      element: "火",
      keywords: ["平衡", "调和", "耐心", "适度"],
      upright: {
        meaning: "平衡调和，耐心适度，和谐统一，内在平静",
        description: "代表平衡和调和，提醒我们保持耐心，适度行事，追求内在的平静。"
      },
      reversed: {
        meaning: "失去平衡，过度极端，缺乏耐心",
        description: "可能失去平衡，行为过度极端，或者缺乏耐心。"
      }
    },
    {
      id: 15,
      name: "恶魔",
      nameEn: "The Devil",
      number: 15,
      element: "土",
      keywords: ["束缚", "欲望", "物质", "黑暗"],
      upright: {
        meaning: "束缚限制，欲望诱惑，物质执着，黑暗面",
        description: "代表束缚和欲望，提醒我们识别束缚，控制欲望，面对自己的黑暗面。"
      },
      reversed: {
        meaning: "摆脱束缚，欲望释放，重获自由",
        description: "可能摆脱了束缚，释放了欲望，或者重获自由。"
      }
    },
    {
      id: 16,
      name: "高塔",
      nameEn: "The Tower",
      number: 16,
      element: "火",
      keywords: ["突然变化", "破坏", "启示", "解放"],
      upright: {
        meaning: "突然变化，破坏重建，启示觉醒，解放自由",
        description: "代表突然的变化和破坏，提醒我们接受改变，从破坏中获得启示和解放。"
      },
      reversed: {
        meaning: "避免破坏，渐进改变，温和转变",
        description: "可能避免了破坏，通过渐进的方式改变，或者温和地转变。"
      }
    },
    {
      id: 17,
      name: "星星",
      nameEn: "The Star",
      number: 17,
      element: "风",
      keywords: ["希望", "灵感", "治愈", "指引"],
      upright: {
        meaning: "希望信心，灵感启发，治愈恢复，指引方向",
        description: "代表希望和灵感，提醒我们保持信心，寻找灵感，获得治愈和指引。"
      },
      reversed: {
        meaning: "失去希望，缺乏灵感，迷失方向",
        description: "可能失去了希望，缺乏灵感，或者迷失了方向。"
      }
    },
    {
      id: 18,
      name: "月亮",
      nameEn: "The Moon",
      number: 18,
      element: "水",
      keywords: ["直觉", "幻想", "恐惧", "潜意识"],
      upright: {
        meaning: "直觉感知，幻想想象，面对恐惧，探索潜意识",
        description: "代表直觉和幻想，提醒我们相信直觉，面对恐惧，探索潜意识的世界。"
      },
      reversed: {
        meaning: "直觉混乱，幻想过度，恐惧控制",
        description: "可能直觉混乱，幻想过度，或者被恐惧控制。"
      }
    },
    {
      id: 19,
      name: "太阳",
      nameEn: "The Sun",
      number: 19,
      element: "火",
      keywords: ["快乐", "成功", "活力", "真理"],
      upright: {
        meaning: "快乐成功，活力充沛，真理光明，积极向上",
        description: "代表快乐和成功，提醒我们保持活力，追求真理，积极向上地生活。"
      },
      reversed: {
        meaning: "暂时困难，活力不足，信心缺失",
        description: "可能面临暂时困难，活力不足，或者缺乏信心。"
      }
    },
    {
      id: 20,
      name: "审判",
      nameEn: "Judgement",
      number: 20,
      element: "火",
      keywords: ["重生", "觉醒", "救赎", "召唤"],
      upright: {
        meaning: "重生觉醒，救赎解脱，召唤使命，内在召唤",
        description: "代表重生和觉醒，提醒我们接受救赎，回应内在的召唤，完成使命。"
      },
      reversed: {
        meaning: "抗拒觉醒，拒绝救赎，忽视召唤",
        description: "可能抗拒觉醒，拒绝救赎，或者忽视了内在的召唤。"
      }
    },
    {
      id: 21,
      name: "世界",
      nameEn: "The World",
      number: 21,
      element: "土",
      keywords: ["完成", "圆满", "和谐", "整合"],
      upright: {
        meaning: "完成圆满，和谐统一，整合融合，完美结局",
        description: "代表完成和圆满，提醒我们整合所有经验，达到和谐统一，完成人生旅程。"
      },
      reversed: {
        meaning: "未完成，缺乏圆满，需要继续",
        description: "可能还未完成，缺乏圆满，需要继续努力。"
      }
    }
  ],

  // 小阿卡纳 (Minor Arcana) - 56张
  // 权杖牌组 (Wands) - 火元素
  wands: [
    {
      id: 22,
      name: "权杖王牌",
      nameEn: "Ace of Wands",
      suit: "权杖",
      element: "火",
      keywords: ["新机会", "创造力", "灵感", "潜力"],
      upright: {
        meaning: "新的机会，创造力爆发，灵感启发，潜力无限",
        description: "代表新的开始和创造力的爆发，提醒我们抓住机会，发挥创造力。"
      },
      reversed: {
        meaning: "机会错过，创造力受阻，缺乏灵感",
        description: "可能错过了机会，创造力受阻，或者缺乏灵感。"
      }
    },
    {
      id: 23,
      name: "权杖二",
      nameEn: "Two of Wands",
      suit: "权杖",
      element: "火",
      keywords: ["选择", "计划", "发现", "决定"],
      upright: {
        meaning: "面临选择，制定计划，发现新路，做出决定",
        description: "代表选择和计划，提醒我们仔细考虑，制定计划，做出正确的决定。"
      },
      reversed: {
        meaning: "选择困难，计划受阻，缺乏方向",
        description: "可能面临选择困难，计划受阻，或者缺乏方向。"
      }
    }
  ],

  // 圣杯牌组 (Cups) - 水元素
  cups: [
    {
      id: 78,
      name: "圣杯王牌",
      nameEn: "Ace of Cups",
      suit: "圣杯",
      element: "水",
      keywords: ["情感", "爱", "直觉", "创造力"],
      upright: {
        meaning: "情感丰富，爱的表达，直觉敏锐，创造力",
        description: "代表情感和爱的开始，提醒我们表达情感，相信直觉，发挥创造力。"
      },
      reversed: {
        meaning: "情感枯竭，爱意缺失，直觉混乱",
        description: "可能情感枯竭，缺乏爱意，或者直觉混乱。"
      }
    }
  ],

  // 宝剑牌组 (Swords) - 风元素
  swords: [
    {
      id: 134,
      name: "宝剑王牌",
      nameEn: "Ace of Swords",
      suit: "宝剑",
      element: "风",
      keywords: ["真理", "清晰", "突破", "胜利"],
      upright: {
        meaning: "真理显现，思维清晰，突破障碍，获得胜利",
        description: "代表真理和清晰的思维，提醒我们追求真理，保持清晰的思维。"
      },
      reversed: {
        meaning: "真理被掩盖，思维混乱，突破失败",
        description: "可能真理被掩盖，思维混乱，或者突破失败。"
      }
    }
  ],

  // 金币牌组 (Pentacles) - 土元素
  pentacles: [
    {
      id: 190,
      name: "金币王牌",
      nameEn: "Ace of Pentacles",
      suit: "金币",
      element: "土",
      keywords: ["物质", "机会", "繁荣", "基础"],
      upright: {
        meaning: "物质机会，繁荣开始，建立基础，实际收获",
        description: "代表物质的机会和繁荣的开始，提醒我们抓住机会，建立坚实的基础。"
      },
      reversed: {
        meaning: "机会错过，繁荣受阻，基础不稳",
        description: "可能错过了机会，繁荣受阻，或者基础不稳。"
      }
    }
  ]
};

// 获取所有塔罗牌
export const getAllCards = () => {
  const allCards = [];
  
  // 添加大阿卡纳
  allCards.push(...tarotCards.majorArcana);
  
  // 添加小阿卡纳（这里简化处理，实际应该有56张小阿卡纳）
  allCards.push(...tarotCards.wands);
  allCards.push(...tarotCards.cups);
  allCards.push(...tarotCards.swords);
  allCards.push(...tarotCards.pentacles);
  
  return allCards;
};

// 获取随机卡片
export const getRandomCard = () => {
  const allCards = getAllCards();
  const randomIndex = Math.floor(Math.random() * allCards.length);
  return allCards[randomIndex];
};

// 获取多张随机卡片
export const getRandomCards = (count) => {
  const allCards = getAllCards();
  const shuffled = [...allCards].sort(() => 0.5 - Math.random());
  return shuffled.slice(0, count);
}; 